using System;
using System.Collections.Generic;
using System.Net;
using System.Text;

namespace CoreIMSEE.Core.Security
{
    public class CertificatePolicySwitcher
    {
        private static ICertificatePolicy defaultPolicy = System.Net.ServicePointManager.CertificatePolicy;
        
        public static void SetTrustMode(bool mode)
        {
            if (mode)
                System.Net.ServicePointManager.CertificatePolicy = new TrustedCertificatePolicy();
            else
                System.Net.ServicePointManager.CertificatePolicy = defaultPolicy;

        }
        
    }
}
